1. Field of the Invention
The present invention relates to a method and an apparatus for measuring three-dimensional measurement using plural cameras which are disposed while a positional relationship and optical axis directions are fixed such that visual fields of the cameras overlap within a predetermined range.
2. Description of the Related Art
In this kind of three-dimensional measurement processing, generally two cameras are used, a three-dimensional coordinate is computed for feature points which appear commonly in images produced by both the cameras based on a triangulation principle. In order to specify the feature point which becomes a measurement target, one of the images is set at a reference image, a representative point included in the measuring object is extracted from the reference image, and processing (for example, pattern matching) for searching a corresponding point in the other image is performed using an image within a region having a predetermined size including the representative point. In computing the three-dimensional coordinate, computation is performed using parameters previously set by calibration.
In the corresponding point search processing, in order to efficiently and accurately perform the search, there is widely adopted a method, in which an epipolar line is specified on a search target image based on a coordinate of the representative point in the reference image or a positional relationship between the cameras and a region corresponding to the region including the feature point is searched along the epipolar line (refer to, for example, Japanese Patent Application Laid-Open No. 2004-234423).
In the three-dimensional measurement processing, it is necessary that a relative positional relationship and optical axis directions of the cameras be fixed with respect to the measurement target region. However, sometimes a position or an attitude of the camera is changed from any cause. In such cases, because the point corresponding to the feature point on the reference image side is shifted from the proper position, three-dimensional coordinate computation result also becomes incorrect.
When the three-dimensional measurement result becomes incorrect due to the change in position or attitude of the camera, a fatal damage is possibly generated in the case where the exact measurement result is required.
For example, in the case where a robot hand is positioned by the three-dimensional measurement in an assembly line of a plant, when processing advances without noticing the incorrect measurement result, possibly a defective is generated or a processing error is generated. In the case where inspection is performed by the three-dimensional measurement, the defective is overlooked and delivered, or there is a risk of increasing the number of products which are determined as the defective although they are a non-defective item.
In view of the above-described problem, an object of the present invention is to provide a method and an apparatus for measuring three-dimensional measurement, in which a user can quickly notice and deal with the incorrect three-dimensional measurement result because the relationship between the cameras differs from that of the initial setting state.